package com.general.framework.qinyi.event;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
@SpringBootApplication
public class Main {
    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(Main.class, args);
        PushEventPublisher pushEventPublisher = applicationContext.getBean(PushEventPublisher.class);
        // 获取 PushEventPublisher 实例
        PushEventMessage message = new PushEventMessage();
        message.setContent("hello world");
        // 调用 publish 方法
        pushEventPublisher.publish(message);
    }
}